{% extends 'account/person_center.html' %}
{% load i18n static %}

{% block head %}
    <title>重设我的密码</title>
{% endblock head %}

{% block user %}{% endblock user %}

{% block section %}

<div class="content">
    <h1>{{ title }}</h1>
    {% if validlink %}

<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>

<form method="post">{% csrf_token %}
<fieldset class="field">
    <div class="field">
        {{ form.new_password1.errors }}
        <label for="id_new_password1">{% trans 'New password:' %}</label>
        <!-- {{ form.new_password1 }} -->
        <div class=" control">
            <input class="input" type="password" name="{{ form.new_password1.html_name }}" id="{{ form.new_password1.id_for_label }}" placeholder="请输入新的密码">
        </div>
    </div>
    <div class="field">
        {{ form.new_password2.errors }}
        <label for="id_new_password2">{% trans 'Confirm password:' %}</label>
        <!-- {{ form.new_password2 }} -->
        <div class=" control">
            <input class="input" type="password" name="{{ form.new_password2.html_name }}" id="{{ form.new_password2.id_for_label }}" placeholder="请再次输入新的密码">
        </div>
    </div>
    <input class=" button is-primary" type="submit" value="{% trans 'Change my password' %}">
</fieldset>
</form>

{% else %}

<p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>

{% endif %}
</div>
{% endblock section %}